package com.fz.mapper;

import com.fz.entity.Student;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by webrx on 2017-09-12.
 */

public interface Studentmapper {
    @Select("select * from student")
    public List<Student> queryall();
    @Select("select * from student limit #{start},#{size}")
    public List<Student> query(@Param("start") int start,@Param("size") int size);
    @Select("select count(*) from student")
    public int pagecount();
    @Delete("delete from student where id=#{id}")
    public int deleteById(int id);
    @Select("select * from student where id=#{id}")
    public Student qu(int id);
    @Update("update student set name=#{name},score=#{score},address=#{address} where id=#{id}")
    public int update(Student student);
    @Insert("insert into student values(null,#{name},#{score},#{address})")
    public int insert(Student student);
}
